3.1.37 \(\int x^2 (a+b \sec (c+d \sqrt {x}))^2 \, dx\) [37]

3.1.37.1 Optimal result
3.1.37.2 Mathematica [A] (verified)
3.1.37.3 Rubi [A] (verified)
3.1.37.4 Maple [F]
3.1.37.5 Fricas [F]
3.1.37.6 Sympy [F]
3.1.37.7 Maxima [B] (verification not implemented)
3.1.37.8 Giac [F]
3.1.37.9 Mupad [F(-1)]

3.1.37.1 Optimal result

Integrand size = 20, antiderivative size = 551 \[ \int x^2 \left (a+b \sec \left (c+d \sqrt {x}\right )\right )^2 \, dx=-\frac {2 i b^2 x^{5/2}}{d}+\frac {a^2 x^3}{3}-\frac {8 i a b x^{5/2} \arctan \left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {10 b^2 x^2 \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}+\frac {20 i a b x^2 \operatorname {PolyLog}\left (2,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {20 i a b x^2 \operatorname {PolyLog}\left (2,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {20 i b^2 x^{3/2} \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}-\frac {80 a b x^{3/2} \operatorname {PolyLog}\left (3,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {80 a b x^{3/2} \operatorname {PolyLog}\left (3,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {30 b^2 x \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^4}-\frac {240 i a b x \operatorname {PolyLog}\left (4,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4}+\frac {240 i a b x \operatorname {PolyLog}\left (4,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4}+\frac {30 i b^2 \sqrt {x} \operatorname {PolyLog}\left (4,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^5}+\frac {480 a b \sqrt {x} \operatorname {PolyLog}\left (5,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^5}-\frac {480 a b \sqrt {x} \operatorname {PolyLog}\left (5,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^5}-\frac {15 b^2 \operatorname {PolyLog}\left (5,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^6}+\frac {480 i a b \operatorname {PolyLog}\left (6,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^6}-\frac {480 i a b \operatorname {PolyLog}\left (6,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^6}+\frac {2 b^2 x^{5/2} \tan \left (c+d \sqrt {x}\right )}{d} \]

output
480*I*a*b*polylog(6,-I*exp(I*(c+d*x^(1/2))))/d^6+1/3*a^2*x^3-480*I*a*b*pol 
ylog(6,I*exp(I*(c+d*x^(1/2))))/d^6+10*b^2*x^2*ln(1+exp(2*I*(c+d*x^(1/2)))) 
/d^2-8*I*a*b*x^(5/2)*arctan(exp(I*(c+d*x^(1/2))))/d+20*I*a*b*x^2*polylog(2 
,-I*exp(I*(c+d*x^(1/2))))/d^2+240*I*a*b*x*polylog(4,I*exp(I*(c+d*x^(1/2))) 
)/d^4-80*a*b*x^(3/2)*polylog(3,-I*exp(I*(c+d*x^(1/2))))/d^3+80*a*b*x^(3/2) 
*polylog(3,I*exp(I*(c+d*x^(1/2))))/d^3+30*b^2*x*polylog(3,-exp(2*I*(c+d*x^ 
(1/2))))/d^4-20*I*b^2*x^(3/2)*polylog(2,-exp(2*I*(c+d*x^(1/2))))/d^3-20*I* 
a*b*x^2*polylog(2,I*exp(I*(c+d*x^(1/2))))/d^2-15*b^2*polylog(5,-exp(2*I*(c 
+d*x^(1/2))))/d^6+30*I*b^2*polylog(4,-exp(2*I*(c+d*x^(1/2))))*x^(1/2)/d^5- 
240*I*a*b*x*polylog(4,-I*exp(I*(c+d*x^(1/2))))/d^4-2*I*b^2*x^(5/2)/d+480*a 
*b*polylog(5,-I*exp(I*(c+d*x^(1/2))))*x^(1/2)/d^5-480*a*b*polylog(5,I*exp( 
I*(c+d*x^(1/2))))*x^(1/2)/d^5+2*b^2*x^(5/2)*tan(c+d*x^(1/2))/d
 
3.1.37.2 Mathematica [A] (verified)

Time = 1.26 (sec) , antiderivative size = 543, normalized size of antiderivative = 0.99 \[ \int x^2 \left (a+b \sec \left (c+d \sqrt {x}\right )\right )^2 \, dx=\frac {-6 i b^2 d^5 x^{5/2}+a^2 d^6 x^3-24 i a b d^5 x^{5/2} \arctan \left (e^{i \left (c+d \sqrt {x}\right )}\right )+30 b^2 d^4 x^2 \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )+60 i a b d^4 x^2 \operatorname {PolyLog}\left (2,-i e^{i \left (c+d \sqrt {x}\right )}\right )-60 i a b d^4 x^2 \operatorname {PolyLog}\left (2,i e^{i \left (c+d \sqrt {x}\right )}\right )-60 i b^2 d^3 x^{3/2} \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )-240 a b d^3 x^{3/2} \operatorname {PolyLog}\left (3,-i e^{i \left (c+d \sqrt {x}\right )}\right )+240 a b d^3 x^{3/2} \operatorname {PolyLog}\left (3,i e^{i \left (c+d \sqrt {x}\right )}\right )+90 b^2 d^2 x \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )-720 i a b d^2 x \operatorname {PolyLog}\left (4,-i e^{i \left (c+d \sqrt {x}\right )}\right )+720 i a b d^2 x \operatorname {PolyLog}\left (4,i e^{i \left (c+d \sqrt {x}\right )}\right )+90 i b^2 d \sqrt {x} \operatorname {PolyLog}\left (4,-e^{2 i \left (c+d \sqrt {x}\right )}\right )+1440 a b d \sqrt {x} \operatorname {PolyLog}\left (5,-i e^{i \left (c+d \sqrt {x}\right )}\right )-1440 a b d \sqrt {x} \operatorname {PolyLog}\left (5,i e^{i \left (c+d \sqrt {x}\right )}\right )-45 b^2 \operatorname {PolyLog}\left (5,-e^{2 i \left (c+d \sqrt {x}\right )}\right )+1440 i a b \operatorname {PolyLog}\left (6,-i e^{i \left (c+d \sqrt {x}\right )}\right )-1440 i a b \operatorname {PolyLog}\left (6,i e^{i \left (c+d \sqrt {x}\right )}\right )+6 b^2 d^5 x^{5/2} \tan \left (c+d \sqrt {x}\right )}{3 d^6} \]

input
Integrate[x^2*(a + b*Sec[c + d*Sqrt[x]])^2,x]
 
output
((-6*I)*b^2*d^5*x^(5/2) + a^2*d^6*x^3 - (24*I)*a*b*d^5*x^(5/2)*ArcTan[E^(I 
*(c + d*Sqrt[x]))] + 30*b^2*d^4*x^2*Log[1 + E^((2*I)*(c + d*Sqrt[x]))] + ( 
60*I)*a*b*d^4*x^2*PolyLog[2, (-I)*E^(I*(c + d*Sqrt[x]))] - (60*I)*a*b*d^4* 
x^2*PolyLog[2, I*E^(I*(c + d*Sqrt[x]))] - (60*I)*b^2*d^3*x^(3/2)*PolyLog[2 
, -E^((2*I)*(c + d*Sqrt[x]))] - 240*a*b*d^3*x^(3/2)*PolyLog[3, (-I)*E^(I*( 
c + d*Sqrt[x]))] + 240*a*b*d^3*x^(3/2)*PolyLog[3, I*E^(I*(c + d*Sqrt[x]))] 
 + 90*b^2*d^2*x*PolyLog[3, -E^((2*I)*(c + d*Sqrt[x]))] - (720*I)*a*b*d^2*x 
*PolyLog[4, (-I)*E^(I*(c + d*Sqrt[x]))] + (720*I)*a*b*d^2*x*PolyLog[4, I*E 
^(I*(c + d*Sqrt[x]))] + (90*I)*b^2*d*Sqrt[x]*PolyLog[4, -E^((2*I)*(c + d*S 
qrt[x]))] + 1440*a*b*d*Sqrt[x]*PolyLog[5, (-I)*E^(I*(c + d*Sqrt[x]))] - 14 
40*a*b*d*Sqrt[x]*PolyLog[5, I*E^(I*(c + d*Sqrt[x]))] - 45*b^2*PolyLog[5, - 
E^((2*I)*(c + d*Sqrt[x]))] + (1440*I)*a*b*PolyLog[6, (-I)*E^(I*(c + d*Sqrt 
[x]))] - (1440*I)*a*b*PolyLog[6, I*E^(I*(c + d*Sqrt[x]))] + 6*b^2*d^5*x^(5 
/2)*Tan[c + d*Sqrt[x]])/(3*d^6)
 
3.1.37.3 Rubi [A] (verified)

Time = 0.85 (sec) , antiderivative size = 554, normalized size of antiderivative = 1.01, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4692, 3042, 4678, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int x^2 \left (a+b \sec \left (c+d \sqrt {x}\right )\right )^2 \, dx\)

\(\Big \downarrow \) 4692

\(\displaystyle 2 \int x^{5/2} \left (a+b \sec \left (c+d \sqrt {x}\right )\right )^2d\sqrt {x}\)

\(\Big \downarrow \) 3042

\(\displaystyle 2 \int x^{5/2} \left (a+b \csc \left (c+d \sqrt {x}+\frac {\pi }{2}\right )\right )^2d\sqrt {x}\)

\(\Big \downarrow \) 4678

\(\displaystyle 2 \int \left (a^2 x^{5/2}+b^2 \sec ^2\left (c+d \sqrt {x}\right ) x^{5/2}+2 a b \sec \left (c+d \sqrt {x}\right ) x^{5/2}\right )d\sqrt {x}\)

\(\Big \downarrow \) 2009

\(\displaystyle 2 \left (\frac {a^2 x^3}{6}-\frac {4 i a b x^{5/2} \arctan \left (e^{i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {240 i a b \operatorname {PolyLog}\left (6,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^6}-\frac {240 i a b \operatorname {PolyLog}\left (6,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^6}+\frac {240 a b \sqrt {x} \operatorname {PolyLog}\left (5,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^5}-\frac {240 a b \sqrt {x} \operatorname {PolyLog}\left (5,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^5}-\frac {120 i a b x \operatorname {PolyLog}\left (4,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4}+\frac {120 i a b x \operatorname {PolyLog}\left (4,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^4}-\frac {40 a b x^{3/2} \operatorname {PolyLog}\left (3,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {40 a b x^{3/2} \operatorname {PolyLog}\left (3,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {10 i a b x^2 \operatorname {PolyLog}\left (2,-i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {10 i a b x^2 \operatorname {PolyLog}\left (2,i e^{i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {15 b^2 \operatorname {PolyLog}\left (5,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{2 d^6}+\frac {15 i b^2 \sqrt {x} \operatorname {PolyLog}\left (4,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^5}+\frac {15 b^2 x \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^4}-\frac {10 i b^2 x^{3/2} \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {5 b^2 x^2 \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}+\frac {b^2 x^{5/2} \tan \left (c+d \sqrt {x}\right )}{d}-\frac {i b^2 x^{5/2}}{d}\right )\)

input
Int[x^2*(a + b*Sec[c + d*Sqrt[x]])^2,x]
 
output
2*(((-I)*b^2*x^(5/2))/d + (a^2*x^3)/6 - ((4*I)*a*b*x^(5/2)*ArcTan[E^(I*(c 
+ d*Sqrt[x]))])/d + (5*b^2*x^2*Log[1 + E^((2*I)*(c + d*Sqrt[x]))])/d^2 + ( 
(10*I)*a*b*x^2*PolyLog[2, (-I)*E^(I*(c + d*Sqrt[x]))])/d^2 - ((10*I)*a*b*x 
^2*PolyLog[2, I*E^(I*(c + d*Sqrt[x]))])/d^2 - ((10*I)*b^2*x^(3/2)*PolyLog[ 
2, -E^((2*I)*(c + d*Sqrt[x]))])/d^3 - (40*a*b*x^(3/2)*PolyLog[3, (-I)*E^(I 
*(c + d*Sqrt[x]))])/d^3 + (40*a*b*x^(3/2)*PolyLog[3, I*E^(I*(c + d*Sqrt[x] 
))])/d^3 + (15*b^2*x*PolyLog[3, -E^((2*I)*(c + d*Sqrt[x]))])/d^4 - ((120*I 
)*a*b*x*PolyLog[4, (-I)*E^(I*(c + d*Sqrt[x]))])/d^4 + ((120*I)*a*b*x*PolyL 
og[4, I*E^(I*(c + d*Sqrt[x]))])/d^4 + ((15*I)*b^2*Sqrt[x]*PolyLog[4, -E^(( 
2*I)*(c + d*Sqrt[x]))])/d^5 + (240*a*b*Sqrt[x]*PolyLog[5, (-I)*E^(I*(c + d 
*Sqrt[x]))])/d^5 - (240*a*b*Sqrt[x]*PolyLog[5, I*E^(I*(c + d*Sqrt[x]))])/d 
^5 - (15*b^2*PolyLog[5, -E^((2*I)*(c + d*Sqrt[x]))])/(2*d^6) + ((240*I)*a* 
b*PolyLog[6, (-I)*E^(I*(c + d*Sqrt[x]))])/d^6 - ((240*I)*a*b*PolyLog[6, I* 
E^(I*(c + d*Sqrt[x]))])/d^6 + (b^2*x^(5/2)*Tan[c + d*Sqrt[x]])/d)
 

3.1.37.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4678
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(n_.)*((c_.) + (d_.)*(x_))^(m_.) 
, x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, (a + b*Csc[e + f*x])^n, x], 
 x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[m, 0] && IGtQ[n, 0]
 

rule 4692
Int[(x_)^(m_.)*((a_.) + (b_.)*Sec[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol 
] :> Simp[1/n   Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a + b*Sec[c + d*x])^ 
p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[(m + 
 1)/n], 0] && IntegerQ[p]
 
3.1.37.4 Maple [F]

\[\int x^{2} \left (a +b \sec \left (c +d \sqrt {x}\right )\right )^{2}d x\]

input
int(x^2*(a+b*sec(c+d*x^(1/2)))^2,x)
 
output
int(x^2*(a+b*sec(c+d*x^(1/2)))^2,x)
 
3.1.37.5 Fricas [F]

\[ \int x^2 \left (a+b \sec \left (c+d \sqrt {x}\right )\right )^2 \, dx=\int { {\left (b \sec \left (d \sqrt {x} + c\right ) + a\right )}^{2} x^{2} \,d x } \]

input
integrate(x^2*(a+b*sec(c+d*x^(1/2)))^2,x, algorithm="fricas")
 
output
integral(b^2*x^2*sec(d*sqrt(x) + c)^2 + 2*a*b*x^2*sec(d*sqrt(x) + c) + a^2 
*x^2, x)
 
3.1.37.6 Sympy [F]

\[ \int x^2 \left (a+b \sec \left (c+d \sqrt {x}\right )\right )^2 \, dx=\int x^{2} \left (a + b \sec {\left (c + d \sqrt {x} \right )}\right )^{2}\, dx \]

input
integrate(x**2*(a+b*sec(c+d*x**(1/2)))**2,x)
 
output
Integral(x**2*(a + b*sec(c + d*sqrt(x)))**2, x)
 
3.1.37.7 Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 3879 vs. \(2 (422) = 844\).

Time = 0.61 (sec) , antiderivative size = 3879, normalized size of antiderivative = 7.04 \[ \int x^2 \left (a+b \sec \left (c+d \sqrt {x}\right )\right )^2 \, dx=\text {Too large to display} \]

input
integrate(x^2*(a+b*sec(c+d*x^(1/2)))^2,x, algorithm="maxima")
 
output
1/3*((d*sqrt(x) + c)^6*a^2 - 6*(d*sqrt(x) + c)^5*a^2*c + 15*(d*sqrt(x) + c 
)^4*a^2*c^2 - 20*(d*sqrt(x) + c)^3*a^2*c^3 + 15*(d*sqrt(x) + c)^2*a^2*c^4 
- 6*(d*sqrt(x) + c)*a^2*c^5 - 12*a*b*c^5*log(sec(d*sqrt(x) + c) + tan(d*sq 
rt(x) + c)) - 6*(12*b^2*c^5 + 12*((d*sqrt(x) + c)^5*a*b - 5*(d*sqrt(x) + c 
)^4*a*b*c + 10*(d*sqrt(x) + c)^3*a*b*c^2 - 10*(d*sqrt(x) + c)^2*a*b*c^3 + 
5*(d*sqrt(x) + c)*a*b*c^4 + ((d*sqrt(x) + c)^5*a*b - 5*(d*sqrt(x) + c)^4*a 
*b*c + 10*(d*sqrt(x) + c)^3*a*b*c^2 - 10*(d*sqrt(x) + c)^2*a*b*c^3 + 5*(d* 
sqrt(x) + c)*a*b*c^4)*cos(2*d*sqrt(x) + 2*c) + (I*(d*sqrt(x) + c)^5*a*b - 
5*I*(d*sqrt(x) + c)^4*a*b*c + 10*I*(d*sqrt(x) + c)^3*a*b*c^2 - 10*I*(d*sqr 
t(x) + c)^2*a*b*c^3 + 5*I*(d*sqrt(x) + c)*a*b*c^4)*sin(2*d*sqrt(x) + 2*c)) 
*arctan2(cos(d*sqrt(x) + c), sin(d*sqrt(x) + c) + 1) + 12*((d*sqrt(x) + c) 
^5*a*b - 5*(d*sqrt(x) + c)^4*a*b*c + 10*(d*sqrt(x) + c)^3*a*b*c^2 - 10*(d* 
sqrt(x) + c)^2*a*b*c^3 + 5*(d*sqrt(x) + c)*a*b*c^4 + ((d*sqrt(x) + c)^5*a* 
b - 5*(d*sqrt(x) + c)^4*a*b*c + 10*(d*sqrt(x) + c)^3*a*b*c^2 - 10*(d*sqrt( 
x) + c)^2*a*b*c^3 + 5*(d*sqrt(x) + c)*a*b*c^4)*cos(2*d*sqrt(x) + 2*c) + (I 
*(d*sqrt(x) + c)^5*a*b - 5*I*(d*sqrt(x) + c)^4*a*b*c + 10*I*(d*sqrt(x) + c 
)^3*a*b*c^2 - 10*I*(d*sqrt(x) + c)^2*a*b*c^3 + 5*I*(d*sqrt(x) + c)*a*b*c^4 
)*sin(2*d*sqrt(x) + 2*c))*arctan2(cos(d*sqrt(x) + c), -sin(d*sqrt(x) + c) 
+ 1) - 10*(6*(d*sqrt(x) + c)^4*b^2 - 16*(d*sqrt(x) + c)^3*b^2*c + 18*(d*sq 
rt(x) + c)^2*b^2*c^2 - 12*(d*sqrt(x) + c)*b^2*c^3 + 3*b^2*c^4 + (6*(d*s...
 
3.1.37.8 Giac [F]

\[ \int x^2 \left (a+b \sec \left (c+d \sqrt {x}\right )\right )^2 \, dx=\int { {\left (b \sec \left (d \sqrt {x} + c\right ) + a\right )}^{2} x^{2} \,d x } \]

input
integrate(x^2*(a+b*sec(c+d*x^(1/2)))^2,x, algorithm="giac")
 
output
integrate((b*sec(d*sqrt(x) + c) + a)^2*x^2, x)
 
3.1.37.9 Mupad [F(-1)]

Timed out. \[ \int x^2 \left (a+b \sec \left (c+d \sqrt {x}\right )\right )^2 \, dx=\int x^2\,{\left (a+\frac {b}{\cos \left (c+d\,\sqrt {x}\right )}\right )}^2 \,d x \]

input
int(x^2*(a + b/cos(c + d*x^(1/2)))^2,x)
 
output
int(x^2*(a + b/cos(c + d*x^(1/2)))^2, x)